package com.controller.qsl;

import com.bean.qsl.CfInfo;
import com.dao.qsl.WpddDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class GetWpController {
      @Autowired
      private WpddDao w;

      /**
       *
       * @return
       * 前端进行委派订单显示
       */
      @RequestMapping("/QslPage/wpxx")
      @ResponseBody
      public List<CfInfo> wp(HttpServletRequest request){

	  return w.wp(request);
      }

      /**
       * 委派订单员工进行处理
       */
      @RequestMapping("/QslPage/ddwp")
      @ResponseBody
      public  Boolean wpcl(String wpname , int  bh, String lxdh, HttpServletRequest request){

          return   w.wxddwp(wpname,bh,lxdh,request);

      }

      /**
       * 委派成功修改状态
       */
      @RequestMapping("/QslPage/xiugaimzt")
      @ResponseBody
      public Boolean xgzt(int bh){

                  return w.xgzt(bh);
      }

      /**
       * 处理委派订单
       */
      @RequestMapping("/QslPage/cfxgbxzt")
      @ResponseBody
      public Boolean cl(int wpbh) {

          return   w.clwp(wpbh);
      }

      /**
       * 处理委派订单完成后删除委派订单
       */
      @RequestMapping("/QslPage/shanchuwpdd")
      @ResponseBody
      public Boolean sc(int wpbh){

            return w.scdd(wpbh);
      }
}
